<template>
  <a-modal
    title="员工信息"
    okText="确定"
    cancelText="取消"
    :width="800"
    :visible="visible"
    :confirmLoading="loading"
    @ok="() => { $emit('ok') }"
    @cancel="() => { $emit('cancel') }">
    <a-spin :spinning="loading">
      <a-form
        :form="form"
        v-bind="formLayout">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="旧密码">
              <a-input v-decorator="['password',{ rules: [{ required: true, message: '请输入旧密码' }] }]" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="新密码">
              <a-input v-decorator="['newPassword',{ rules: [{ required: true, message: '请输入新密码' }] }]" />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>

export default {
  props: {
    visible: {
      type: Boolean,
      required: true
    },
    loading: {
      type: Boolean,
      default: () => false
    }
  },
  data () {
    this.formLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      }
    }
    return {
      form: this.$form.createForm(this)
    }
  },
  created () {
  }
}
</script>
